(function() {/* Copyright 2022 Glance Networks, Inc. */ function m(a,...c){!window.console||!window.console[a]||window.GLANCE_COBROWSE&&window.GLANCE_COBROWSE.disableLogging||(c=c.map(b=>{if("object"===typeof b)try{b=JSON.stringify(b)}catch(f){console.error(f),b="unable to convert object to string"}return"string"===typeof b?b.replace(/[\r\n]/g," ").replace("<","<"):b}),window.console[a](...c))}function p(...a){m("log",...a)}function x(...a){m("error",...a)}function y(...a){p("DEBUG:",...a)};/* Copyright (c) 2022 Glance Networks, Inc. */ window.GLANCE=window.GLANCE||{};window.GLANCE.VERSION="6.48.0.1818277650";window.GLANCE.PATCH="";window.GLANCE.Lib=window.GLANCE.Lib||{}; (function(){var a=navigator.userAgent.toLowerCase(),c=navigator.platform.toLowerCase(),b=a.match(/(edge|edg)[\s\/:]([\w\d\.]+)?/)||a.match(/(opera|ie|firefox|chrome|crios|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||a.match(/(rv):([\w\d\.]+)/)||[null,"unknown",0];"edg"===b[1]&&(b[1]="edge");"crios"===b[1]?b[1]="chrome":"rv"===b[1]&&(b[1]="ie");a={extend:Function.prototype.extend,name:"version"==b[1]?b[3]:b[1],version:"ie"==b[1]&&document.documentMode||parseFloat("opera"== b[1]&&b[4]?b[4]:b[2]),l:{name:a.match(/ip(?:ad|od|hone)/)||c.match(/mac/)&&0z(b,c));if(null!==a&&"object"===typeof a){const b={};Object.entries(a).forEach(([f,k])=>b[f]=z(k,c));return b}return a}if(void 0===aa)var aa=function(a){return A.g?(Array.prototype.toJSON&&(a=z(a,A.g.window)),A.g.window.JSON.stringify(a)):JSON.stringify(a)}; z=function(a,c){if(Array.isArray(a))return(new c.Array(...a)).map(b=>z(b,c));if(null!==a&&"object"===typeof a){const b={};Object.entries(a).forEach(([f,k])=>b[f]=z(k,c));return b}return a};function B(a,c,b){E(window,"addEventListener",a,c,b)}function F(a,c,b){var f={};f[c]=b;a.postMessage(f,"*")}function G(a,c){E(window,"addEventListener","message",function(b){if("string"===typeof b.data)try{var f=JSON.parse(b.data)}catch(k){return!1}else f=b.data;void 0!==f[a]&&c(b.source,f[a])})} function H(){this.name="glance_ssn_info";var a=new M,c=a.h.location.hostname;for(a=a.h;""===c&&a.parent!==a;)c=a.parent.location.hostname,a=a.parent;this.domain=ba(c)}H.prototype.get=function(){return this.i()?decodeURIComponent(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+encodeURIComponent(this.name).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null}; H.prototype.j=function(){var a=new Date;a.setDate(a.getDate()-1);document.cookie=encodeURIComponent(this.name)+"=; expires="+a.toGMTString()+"; domain="+this.domain+"; path=/"};H.prototype.i=function(){return(new RegExp("(?:^|;\\s*)"+encodeURIComponent(this.name).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)};function N(){this.name="glance_ssn_info"} N.prototype.get=function(){if(!this.i())return null;try{return window.localStorage.getItem(this.name)}catch(a){return p("Failed to read cookie: "+this.name),null}};N.prototype.j=function(){try{window.localStorage.removeItem(this.name),window.localStorage.removeItem(this.name+"_exp")}catch(a){p("Failed to delete cookie: "+this.name)}}; N.prototype.i=function(){var a=null;try{a=window.localStorage.getItem(this.name+"_exp")}catch(c){return p("Failed to read cookie: "+this.name),!1}if(!a)return!1;a=new Date(a);return a=b[b.length-2].length?b.slice(b.length-3).join("."):b.slice(b.length-2).join(".")}M.prototype.getElementsByTagName=function(a){return E(this.g,"getElementsByTagName",a)}; function Q(a,c,b,f){var k=a.g.createElement("script");b&&k.addEventListener("load",b);f&&k.addEventListener("error",f);k.setAttribute("type","text/javascript");k.setAttribute("charset","UTF-8");for(b=0;bl.length||B("keydown",e(l[1],parseInt(l[2]),d[h]),!0)}}function c(d){function e(h){return function(l){var q=h.match(/showButton|toggleButton|showTerms/)?"VisitorUI":"Visitor";l.stopPropagation(); l.preventDefault();k(q,h)||(y("button click",q,h),r[q][h]())}}["glance_button","data-glancebutton"].forEach(function(h){for(var l=d.querySelectorAll("["+h+"]"),q=0;l&&qO(e)),"Visitor"===e){var h=document.getElementsByTagName("iframe");for(d=0;d{Z=()=>{d()}});var X={load:function(d){v(d)},loadScript:function(d,e){Q(t,[["src",K+"/"+d+"_"+L+".js"]], e,()=>{O(d)})},setUIReady:Z,_uiready:n,_eventListeners:J,_onload:{},_origpath:document.baseURI,groupid:function(){var d=(new P).get();if(!d)return null;let e;return null==(e=JSON.parse(d).ssnid)?void 0:e.split(".")[0]}()};G("glance_load",function(d,e){d&&(d!==window.parent&&d.parent!==window?p("UNTRUSTED_LOAD_MSG"):(e.s&&v(),e.u&&null!==E(t.g,"getElementById","glance_visitor")&&F(d,"glance_load",{s:!0})))});w&&F(window.parent,"glance_load",{u:!0});window.addEventListener("message",function(d){if("string"!== typeof d.data){if(b().loaded)return!0;d.data.glance_invoke&&v(()=>{b()._handleInvokeMessage(d)})}});B("focus",function(){if(b().loaded)return!0;b().inSession()&&v()});r.Visitor={loaded:!1,inSession:function(){return(new P).i()},addEventListener:function(d,e){J.add(d,e)},removeEventListener:function(d,e){d=J.g[d];void 0!==d&&(e=d.indexOf(e),0<=e&&d.splice(e,1))}};n=["showButton","toggleButton","showTerms","setStyle"];w||(r.VisitorUI={},n.forEach(function(d){f(d,"VisitorUI")}));n=n.concat(["startSession", "setStartParams"]);n.forEach(function(d){f(d,"Visitor")});r.Loader=X;w||V()||!b().inSession()||v();!w&&V()&&v(null,"XDOM");R(t,function(){document.body&&!Y&&(Y=!0,c(document.body),a(u.v),u.A&&!w&&Q(t,[["src",K+"/GlancePresenceVisitor_"+L+".js"]]),u.collection&&!w&&Q(t,[["src",K+"/GlanceSessionMetrics_"+L+".js"]],()=>{let d=document.getElementById("glance-cobrowse");(new window.GLANCE.VisitorSessionMetrics({group_id:d.dataset.groupid,web_server:d.dataset.ws,site:d.dataset.site})).run()}))});G("forwardevent", function(d,e){y("received forwarded event:",e);if(d.top!==window)p("UNTRUSTED_KEYEVT");else window.GLANCE.Cobrowse[e.namespace][e.funcname]()})}}else x("ERR_COBROWSE_NOT_SUPP")}document.getElementById("cobrowsescript")||document.getElementById("glance-cobrowse")?W():(p("LOADER_PAGE_NOT_READY"),R(new M,W));}).call(window); //# sourceMappingURL=map.js.map